package appReate.ViewUtility;

import android.app.Activity;

public class PixDipUtility {

	// dati i dip desiderati restituisce i pixel in funzione della risoluzione
	public static int getPIXfromDIP(Activity activity, int dip) {
		final float scale = activity.getResources().getDisplayMetrics().density;
		int mGestureThreshold = (int) (dip * scale);
		return mGestureThreshold;
	}
	public static int getPIXwidth(Activity activity) {
		final int scale = activity.getResources().getDisplayMetrics().widthPixels;
		
		return scale;
	}
	public static int getPIXheight(Activity activity) {
		final int scale = activity.getResources().getDisplayMetrics().heightPixels;
		
		return scale;
	}
}
